<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
  <meta name="referrer" content="never">
  <!-- <meta name="referrer" content="no-referrer"> -->
  <meta name="format-detection" content="telephone=yes" />
  <title></title>
  <!-- <script src="https://d.zowoyoo.com/ajax/libs/vconsole.min.js"></script>
  <script>
    // eslint-disable-next-line no-undef
    var vConsole = new VConsole()
  </script> -->
  <!-- 使用CDN的css文件 -->
  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
  <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" >
  <% } %>
  <style>
    ._loading {
      line-height: 40px;
      font-size: 16px;
      text-align: center;
    }
  </style>
</head>

<body>
  <script>
    var _curLanguage = (navigator.language || navigator.userLanguage).slice(0, 2)
    var _curTitle = ''
    if (_curLanguage === 'zh') {
      document.title = _curTitle = '正在加载...'
    }
    if (_curLanguage === 'en') {
      document.title = _curTitle = 'loading...'
    }
  </script>
  <div class="_loading">loading..</div>
  <div id="app"></div>
  <!-- 使用CDN的JS文件 -->
  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
  <script rel="dns-prefetch" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>" crossorigin></script>
  <% } %>
  <% htmlWebpackPlugin.options.cdn %>
</body>

<script>
  let versionW = setTimeout(() => {
    console.log(window.version)
    clearTimeout(versionW)
  }, 3000);
  // 加这段代码是为了防止有用户手动调整微信字体大小
  (function () {
    if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
      handleFontSize();
    } else {
      if (document.addEventListener) {
        document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
      } else if (document.attachEvent) {
        document.attachEvent("WeixinJSBridgeReady", handleFontSize);
        document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
      }
    }
    function handleFontSize() {
      WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
      WeixinJSBridge.on('menu:setfont', function () {
        WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
      });
    }
  })();
</script>
</html>